<template>
  <div>
    <div class="interact">
      <div class="interactList" v-for="(temp,index) in miva" :key="index" @click="checked(temp)">
        <el-image class="item-cover" :src="temp.poster | cover" fit="cover"></el-image>
      </div>
    </div>

    <div class="layer" v-show="show" @click="show = false">
      <hFix :value="nowCheck"></hFix>
    </div>
  </div>
</template>

<script>
import hFix from "@/components/hFix";
export default {
  filters: {
    cover(posters) {
      if (!posters) return "http://placehold.it/640x1280";
      return posters.split(",")[0];
    }
  },
  props: {
    miva: {
      type: [String, Array],
      default: ""
    }
  },
  components: { hFix },
  data() {
    return {
      nowCheck: {},
      show: false
    }; 
  },
  methods: {
    checked(value) {
      // this.show = true;
      // this.nowCheck = value;
      console.log( value)
      this.$store.commit('SETTING_MASK', {type: 'html5', data: value})
    }
  }
};
</script>

<style lang="less">
.interact {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  box-sizing: border-box;
  // padding: 20px 0;
  .item-cover {
    width: 100%;
    height: 100%;
  }
  .interactList {
    // border: 1px solid;
    width: 225px;
    height: 450px;
    overflow: hidden;
    margin: 10px 7px;
    background: #dadada;
    box-shadow: 0px 2px 25px 0px rgba(189, 189, 189, 0.3);
    img {
      width: 100%;
    }
  }
  .layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99;
  }
}
</style>

